fprintf(stderr, "Your argument to -b is fucked up. Use the normal url style: user:pass@server:port or just use server and use default anon login\n Use -h for help\n");
}
break;
case 'd': debugging++; break;
case 'F': fastscan++; break;
case 'f': fragscan++; break;
case 'h':
case '?': printusage(argv[0]);
case 'i': identscan++; break;
case 'l': lamerscan++; udpscan++; break;
case 'M': max_parallel_sockets = atoi(optarg); break;
case 'P': pingscan++; break;
case 'p':
if (ports)
fatal("Only 1 -p option allowed, seperate multiple ranges with commas.");
ports = getpts(optarg); break;
case 'r': randomize++; break;
case 's': synscan++; break;
case 'S':
if (source)
fatal("You can only use the source option once!\n");
source = safe_malloc(sizeof(struct in_addr));
if (!inet_aton(optarg, source))
fatal("You must give the source address in dotted deciman, currently.\n");
break;
case 't': tcpscan++; break;
case 'U': finscan++; break;
case 'u': udpscan++; break;
case 'q': quashargv++; break;
case 'w': global_delay = atoi(optarg); break;
case 'v': verbose++;
}
}
/* Take care of user wierdness */
isr00t = !(geteuid()|geteuid());
if (tcpscan && synscan)
fatal("The -t and -s options can't be used together.\
If you are trying to do TCP SYN scanning, just use -s.\
For normal connect() style scanning, use -t");
if ((synscan || finscan || fragscan || pingscan) && !isr00t)
fatal("Options specified require r00t privileges. You don't have them!");
/* more fakeargv junk, BTW malloc'ing extra space in argv[0] doesn't work */
if (quashargv) {
argvlen = strlen(argv[0]);
if (argvlen < strlen(FAKE_ARGV))
fatal("If you want me to fake your argv, you need to call the program with a longer name. Try the full pathname, or rename it fyodorssuperdedouperportscanner");
strncpy(argv[0], FAKE_ARGV, strlen(FAKE_ARGV));
for(i = strlen(FAKE_ARGV); i < argvlen; i++) argv[0][i] = '\0';